﻿using Fur;
using Fur.DatabaseAccessor;
using HanXuan.EntityFramework.DbContexts;
using Microsoft.Extensions.DependencyInjection;

namespace HanXuan.EntityFramework
{
    [AppStartup(600)]
    public class HanXuanEntityFrameworkStartup : AppStartup
    {
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddDatabaseAccessor(options =>
            {
                options.AddDbPool<HanXuanDbContext>(DbProvider.Sqlite);
                options.AddDbPool<MultiTenantDbContext, MultiTenantDbContextLocator>(DbProvider.Sqlite);
            }, "HanXuan.Migration");
        }
    }
}
